package com.wjw.service;

import com.wjw.pojo.Robot;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service;

@Service
//启用属性的自动配置，相当于@Import()
@EnableConfigurationProperties(Robot.class)
public class RobotService {

    @Autowired
    private Robot robot;

    public Robot sayHello(){
        return robot;
    }
}
